package edu.jd.movieplatform.info.movie.impl;

import edu.jd.movieplatform.info.movie.Movie;
import edu.jd.movieplatform.info.movie.MovieDto;
import edu.jd.movieplatform.info.movie.MovieService;
import edu.jd.movieplatform.info.movie.dao.MovieInfoDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class MovieServiceImpl implements MovieService {

    @Resource
    private MovieInfoDao movieInfoDao;

    @Override
    public List<Movie> getMovieList(MovieDto dto) {
        return movieInfoDao.findMovieListByCondition(dto);
    }

    @Override
    public List<Movie> getMovieNameList() {
        return movieInfoDao.findMovieName();
    }

    @Override
    public List<Movie> movieListByLabel(String label){
        return movieInfoDao.movieListByLabel(label);
    }
}
